﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Configuration;

namespace ConsoleApplication1._01_Config
{
    public static class MyConfig
    {
        public static int RootUserId { get; private set; }
        public static int MTCPUserId { get; private set; }

        static MyConfig()
        {
            {
                int rootUserId = 0;
                bool b = int.TryParse(ConfigurationManager.AppSettings["RootUserId"], out rootUserId);
                if (b)
                {
                    RootUserId = rootUserId;
                }
            }
            {
                int mtcpUserId = 0;
                bool b = int.TryParse(ConfigurationManager.AppSettings["MTCPUserId"], out mtcpUserId);
                if (b)
                {
                    MTCPUserId = mtcpUserId;
                }
            }
        }
    }
}
